package com.zhuss.product.processor;

import java.util.Arrays;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.zhuss.bean.vo.product.train.ListLineStrategySiteVo;
import com.zhuss.enums.TakeType;
import com.zhuss.product.db.dao.ext.LineStrategySiteDao;


/**
 * @description: 策略站点关系读
 * @author: zhushanshuo
 * @create: Fri Dec 18 20:35:18 CST 2020
 **/
@Component("lineStrategySiteRead")
public class LineStrategySiteRead {

	@Autowired
	private LineStrategySiteDao lineStrategySiteDao;

	public List<Long> passonStart(Long siteId) {
		List<Long> result = lineStrategySiteDao.listBySiteAndTakeType(siteId, Arrays.asList(TakeType.可上车.key(), TakeType.不限.key()));
		return result;
	}

	public List<Long> passonEnd(Long siteId) {
		List<Long> result = lineStrategySiteDao.listBySiteAndTakeType(siteId, Arrays.asList(TakeType.可下车.key(), TakeType.不限.key()));
		return result;
	}

	public List<ListLineStrategySiteVo> listByStrategy(Long lineStrategyId) {
		List<ListLineStrategySiteVo> result = lineStrategySiteDao.listByStrategy(lineStrategyId);
		return result;
	}
	
	public List<Long> listSite() {
		List<Long> result = lineStrategySiteDao.listSite();
		return result;
	}


}
